#ifndef COREXMLHANDLER_H
#define COREXMLHANDLER_H

#include <QXmlDefaultHandler>

#include <QDomDocument>
#include <QDomNode>
#include <QDomElement>

class CoreXMLHandler : public QObject, public QXmlDefaultHandler
{
Q_OBJECT
public:
    explicit CoreXMLHandler(QObject *parent = 0);
    bool startDocument();
    bool startElement ( const QString & namespaceURI, const QString & localName, const QString & qName, const QXmlAttributes  & atts );
    bool endElement ( const QString & namespaceURI, const QString & localName, const QString & qName  ) ;
    bool characters ( const QString & ch  );
    bool endDocument();

signals:
    void readyParse(QDomNode);
    void malformedXML(QString err_msg = "");
public slots:

private:
    QDomDocument doc;
    QDomNode rootNode;
    QDomNode currentNode;
};

#endif // COREXMLHANDLER_H
